Skip to content

feat(audience): auto-collect platform ID on consent upgrade to Full#800

Closed
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-539-auto-collect-on-consent-upgrade
Closed

feat(audience): auto-collect platform ID on consent upgrade to Full#800
nattb8 wants to merge 1 commit into
mainfrom
feat/sdk-539-auto-collect-on-consent-upgrade

Conversation

@nattb8

@nattb8 nattb8 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Previously Steam and Epic identity collection only ran at Init. Games that start with Anonymous consent and upgrade to Full via SetConsent never had the platform ID collected, leaving a gap in identity data for the common consent-prompt flow.

The fix adds TryIdentifySteamUser and TryIdentifyEpicUser to SetConsent, gated on a genuine upgrade to Full (level == Full && previous != Full). The same two methods already run at Init, so behaviour is consistent across both entry points.

Closes SDK-539 / part of SDK-534.

Use case gotchas

If a game calls Identify with its own backend user ID and then cycles consent (Full → Anonymous → Full), auto-collection fires again on the upgrade and sets the platform ID as the active user ID. The dev needs to call Identify again with their game user ID after the upgrade — this is expected behaviour since the downgrade already cleared identity state.

If the platform session is not active at the moment consent reaches Full (Steam not running, EOS not yet logged in), collection is silently skipped. Devs who need identity reliably in that scenario should call Identify manually once the platform session is ready.

Test plan

  • Consent starts Anonymous, upgraded to Full via SetConsentidentify event with identity_type='steam' fires
  • Consent starts Anonymous, upgraded to Full via SetConsentidentify event with identity_type='epic' fires
  • Redundant SetConsent(Full) when already Full — auto-collection does not fire again
  • No errors when neither Steam nor EOS plugin is present

🤖 Generated with Claude Code

Previously Steam and Epic identity collection only ran at Init. Games
that start with Anonymous consent and upgrade to Full via SetConsent
never had the platform ID collected automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nattb8 nattb8 requested review from a team as code owners June 24, 2026 06:42
@nattb8

nattb8 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

Reverting — firing on consent upgrade adds DX complexity for limited gain. The platform session (EOS login especially) is often not ready at the moment SetConsent is called, so it silently skips anyway. The consent-cycle case also creates an identity overwrite trap. Init-only is simpler and more predictable.

@nattb8 nattb8 closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant